@extends('layouts._main')

@section('title','订单详情')

@section('css')
    <style>
        /*@main=#d79705*/
        /*@dan=#dec07a*/
        body{
            background-color: #ECECEC;
        }
        .body{
            font-size: 14px;
        }
        .list{
            background-color: #fff;
            padding-bottom: 10px;
            margin-top: 15px;
        }
        .time_status{
            line-height: 35px;
            padding-left: 10px;
            padding-right: 10px;
        }
        .time{
            color: #aaa;
        }
        .status{
            float: right;
        }
        .store{
            font-size: 15px;
            padding: 0px 20px 10px 20px;
            background: url("/images/store_icon.png") no-repeat;
            background-size: 17px 15px;
            margin-left: 10px;
            background-position-y: 5px;
        }
        .goods{
            background-color: #f0eff6;
            text-align: center;
            padding: 10px 0;
        }
        .money,.receipt{
            color: #d79705;
        }
        .order_no,.credits{
            margin-left: 10px;
            margin-top: 10px;
        }
        .credits{
            background: url("/images/version1/icon_credits.png") no-repeat;
            background-size: 34px 17px;
            height: 23px;
            padding-left: 39px;
            line-height: 18px;
        }
        .weui-cell_access .weui-cell__ft:after{
            border-color: #d79705;
            height: 7px;
            width: 7px;
            border-width: 1px 1px 0 0;
        }
        .receipt{
            text-align: right;
            padding-right: 10px;

        }
        .receipt>a{
            background: url("/images/version1/icon_receipt.png") no-repeat;
            background-size: 12px 91%;
            padding-left: 15px;
            background-position-y: 1px;
        }
        .weui-cell_access:active{
            color: #dec07a ;
        }
        .nav_bar{
            background-color: #fff;
            padding: 10px 15px;
            text-align: center;
            border-bottom: 1px solid #D0D0D0;
            position: relative;
        }
        .nav_bar>.nav_back {
            background: url('/images/version1/icon_bar_back.png') no-repeat;
            background-size: 20px 20px;
            position: absolute;
            left: 10px;
            top: 12px;
        }
    </style>
@endsection

@section('container')
    <div class="body">
        <div class="nav_bar">
            订单详情<div class="nav_back"></div>

        </div>

        @forelse($orders as $order)
            <div class="list">
                <div class="time_status">
                    <span class="time">{{ $order['saledate'] }}</span>
                    <span class="status">交易成功</span>
                </div>
                <div class="store">
                    杭州解百店
                </div>

                @foreach($order['detail'] as $detail)
                    <div class="goods weui-flex">
                        <div class="weui-flex__item"><div class="">{{ $detail['3']??'' }}</div></div>
                        <div class="weui-flex__item"><div class="">x{{ $detail['6']??'' }}</div></div>
                        <div class="weui-flex__item"><div class="money">￥{{ $detail['8']??'' }}</div></div>
                    </div>
                @endforeach

                <div class="order_no">订单号：{{ $order['billno'] }}</div>
                {{--<div class="credits">恭喜获得60个积分</div>--}}

                <div class="receipt">
                    <a href="{{ route('Oreceipt',['billno'=>$order['billno']]) }}" class="weui-cell_access ">查看购物小票<span class="weui-cell__ft"></span></a>
                </div>
            </div>
        @empty
            @include('template._empty')
        @endforelse


        <div class="list">
            <div class="time_status">
                <span class="time">2018-05-14 14:56</span>
                <span class="status">交易成功</span>
            </div>
            <div class="store">
                杭州解百店(example)
            </div>

            <div class="goods weui-flex">
                <div class="weui-flex__item"><div class="">手表</div></div>
                <div class="weui-flex__item"><div class="">x1</div></div>
                <div class="weui-flex__item"><div class="money">￥60</div></div>
            </div>

            <div class="order_no">订单号：2589521896</div>
            {{--<div class="credits">恭喜获得60个积分</div>--}}

            <div class="receipt">
                <a href="{{ route('Oreceipt',['billno'=>8665834]) }}" class="weui-cell_access">查看购物小票<span class="weui-cell__ft"></span></a>
            </div>
        </div>
    </div>
@endsection

@section('js')

    <script>

    </script>
@endsection